Echo cancellation and transmit spectrum shaping in digital PCM modems

ABSTRACT

A method of determining digital channel attenuation; comprising the steps of: receiving a known training sequence of PCM codes, which PCM codes are subjected to the attenuation within the digital channel; quantizing the received known training sequence of PCM codes according to a predetermined thresholding procedure; identifying identical PCM codes created as a result of the thresholding procedure; and, determining the attenuation of the digital channel based upon the identification of identical PCM codes. A method is also disclosed for determining a digital channel PCM code transformation comprising receiving a known training sequence of PCM codes, which PCM codes are subjected to the PCM code transformation within the digital channel, quantizing the received known training sequence of PCM codes according to a predetermined thresholding procedure, and determining the transformation of transmitted codes to those received. A method is also disclosed for improved echo cancellation in a communications network having an analog and a digital modem, comprising saving codes transmitted from the digital modem to the analog modem for echo cancellation, transforming, by a mapping table, codes transmitted from said digital modem to codes received by the analog modem, and, using the received codes as a reference signal for cancellation of echo. A method of improved spectral shaping using a transmit shaping transfer function in a communications network having an analog and a digital modem, comprising, transforming, by a mapping table, codes transmitted from the digital modem to codes received by the analog modem, using the received codes for transformation to their linear value equivalent representations, and, applying the linear value representations to the transmit shaping transfer function.

[0001] This is a divisional of U.S. application Ser. No. 09/056,331filed Apr. 7, 1998, which claims the benefit under 35 U.S.C. Section119(e) of United States Provisional Patent Application No. 60/043,066filed on Apr. 8, 1997.

FIELD OF THE INVENTION

[0002] This invention pertains generally to modem technology, morespecifically to PCM modem technology, and more specifically, to a methodfor the discovery of the digital attenuation from a set of received PCMsamples corresponding to a known set of transmit PCM samples.

BACKGROUND OF THE INVENTION

[0003] This invention provides a method for the discovery of the digitalattenuation from set of received pulse code modulation (PCM) samplescorresponding to a known set of transmit PCM samples. The principalfeature set used is the knowledge of which received PCM codes havebecome indistinguishable (i.e., are identical) as a result of theattenuation mapping. An alternative but equivalent feature set would beuse of the absent received PCM codes.

[0004] The question of digital attenuation PAD mapping has been raisedat recent meetings of the Telephone Industry of America (TIA) PCM ModemAd-hoc Committee. Many participants have been hoping for a singleindustry standard mapping solution. We provide a solution, which willallow PCM modems to function properly throughout the entire telephonenetwork including with private telephone equipment (PBX's and keysystems).

[0005] TIA 464A

[0006] TIA 464A is the industry standard plan for private telephoneequipment. Among other recommendations, this specification provides therecommended losses between T1 lines and other devices. If a PBX isdesigned according to the loss-plan specification as outlined insections 4.8.4 and 4.8.5 of 464A, then it should not be necessary toattenuate the PCM on incoming T1 lines for on-premise (ONS) connections,since the recommended 3-dB loss is typically implemented in the analogcircuitry of the ONS codec.

[0007] However, Inter-Tel's experience with customers using T1 linessuggests that the recommended 3-dB of insertion loss is inadequate andthat T1 attenuation pads are indeed necessary. While the standard −3 and−6 dB pads are usually adequate, Inter-Tel has provided a wider-range ofinsertion loss as options for PBX customers. Inter-Tel has implementeddigital gain control on its T1 line cards using two different methods:

[0008] ROM-based mapping

[0009] DSP-based algorithm

[0010] ROM Based Mapping

[0011] Inter-Tel first implemented attenuation pads via an EPROMcircuit, which used the incoming PCM code as 8 bits of an address andadditional address bits selecting the attenuation in 1 dB increments.The output of the EPROM was the attenuated digital PCM code. In thisimplementation, the attenuation range covered from 0 dB to −12 dB in 1dB steps.

[0012] Experience with customers shows that 0 to −6 dB seems to be themost-often used range of T1 pad values. Taking into account the fixed3-dB of loss included with our ONS card, the net insertion loss for toDigital CO connection is then −3 dB to −9 dB, which mimics well thetypical net losses experienced by customers on ONS to Analog COconnections.

[0013] All attenuation tables in the EPROM preserved the LSB of the PCMto preserve the state of the Robbed Bit Signaling (RBIs), if present.However, the preservation of the LSB is unnecessary if no RBSinformation passes through the ROM-based gain control circuitry.

[0014] The ROM-based look-up tables were generated by a custom C programusing the following algorithm:

[0015] 1. Expand incoming 8-bit, u-Law PCM to corresponding 14-bit,signed integer linear value, x

[0016] 2. Calculate output, y, based on equation:y=NT[x*10^((gain/20)))+0.500]

[0017] 3. Compress y back into its corresponding 8-bit u-Law value usingG.711 decision values.

[0018] In addition to performing u-Law to u-Law digital gain control(DGC) through look-up tables, the EPROM also performs DGC throughlook-up tables for the following compression schemes:

[0019] * u-Law-to-A-law

[0020] * A-law-to-u-Law

[0021] * A-law-to-A-law

[0022] DSP Based Mapping

[0023] With the advent of DSP's, for their greater flexibility, thelatest implementation uses the Analog Devices 21xx fixed point family ofprocessors. The PCM codes are converted to/from linear values by theADSP-21xx internal companing hardware. Inter-Tel's algorithm normalizesthe linear value before applying the attenuation multiplier. Theattenuation is selectable as a linear 1.15 fractional multiplier. Theuser interface selects the attenuation in fixed, 1-dB steps over asimilar range as the previous implementation. The user configured dBattenuation is converted to the linear fractional multiplier by analgorithm. Moreover, the instructions in the Analog Devices DSP can useunbiased rounding, truncation and in newer family members, biasedrounding. Inter-Tel's implementation uses the unbiased rounding option(RND) during the MAC instruction. This flexibility in rounding andtruncation obviously can have a substantial effect on the actualattenuation mapping, with the additional caveat of having potentiallydifferent mappings for positive and negative PCM codes.

DESCRIPTION OF THE DRAWINGS

[0024]FIG. 1 shows a process in accordance with an embodiment of theinvention;

[0025]FIG. 2 shows a further process in accordance with an embodiment ofthe invention; and

[0026]FIG. 3 shows a further process in accordance with an embodiment ofthe invention.

DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS

[0027] Detection of the Feature Set

[0028] After a receiver's equalizer has been trained, a known transmitsequence of PCM codes can be sent and received using either all or auseful subset of PCM codes. (This sequence may need to be sent multipletimes to cover all 6 or 12 bit positions in a robbed bit signalingsystem.) The receiver can save the linear values for each received PCMcode. From the known step size between adjacent PCM codes, the receivercan determine those PCM samples that it received which areindistinguishable. The indistinguishable samples arise from two transmitPCM codes which when scaled by the same attenuation and quantizedaccording to a thresholding procedure create identical PCM codes.

[0029] An example taken from the attached attenuation table (pagesA1-A2) which shows the attenuation for each uLaw PCM code when it istransformed by shifting from 1 to 26 codes numerically.

EXAMPLE

[0030] Transmitted Received shifted by 1 PCM code uLaw Linear uLawThreshold Attenuation dB 129 7775 129 7647 0.983537 −0.14419 128 80317903 0.984062 −0.13955

[0031] Processing of Indistinguishable PCM Codes

[0032] The processing of the feature set relies on knowledge of thecoding law (uLaw or Alaw) used. In practice, it is necessary to considerthe preciseness of the numerics used in the attenuation process.Suggestions for accommodating implementation deviations is discussed ina later section. The attached C language source code provided as part ofthis application (pages B1-B21) implements a demonstration of theidentification procedure indistinguishably codes. The basic algorithm isthe following:

[0033] 1. For each indistinguishable PCM code received, the originalpair of transmitted PCM codes can be determined since the PCM codes aresent in a known training sequence. A set of indistinguishabletransmitted PCM code pairs are determined from this training sequence.

[0034] 2. For the first indistinguishable PCM code pair, determine theminimum attenuation required for the larger transmitted PCM code to beattenuated to a number of successive lower PCM codes. (A set of 30successive lower PCM codes would be sufficient to cover an attenuationrange of approximately 11 dB.) Then determine the maximum attenuationpermitted for the smaller transmitted PCM code to be attenuated to thesame successive lower PCM codes. (Minimum attenuation is numericallycloser to one, i.e., a lesser attenuation, while a maximum attenuationis a greater attenuation.) If the maximum attenuation is a smallerattenuation than the minimum attenuation, discard the attenuation rangeas it represents a missing code rather than an indistinguishable code.The minimum and maximum attenuations for each successive lower PCM codeforms an initial set of candidate attenuation ranges.

[0035] 3. For each successive indistinguishable transmit PCM code pair,another set of possible attenuation ranges is determined using theprocedure as described in Step 2. Each element of the candidateattenuation range set created in Step 2 is searched for either full orpartial overlap with any element of the possible attenuation range set.(In case of partial overlap, the attenuation range in the candidate setcan be reduced for refined attenuation accuracy.) In case of no overlap,the candidate attenuation range should be discarded. The discard occursbecause two different indistinguishable codes must arise from the samelinear transformation.

[0036] 4. Step 3 is repeated for successive pairs of indistinguishabletransmit PCM code pairs until either a) the set of candidate attenuationranges is reduced to a single range or b) all the pairs ofindistinguishable transmit PCM code pairs have been processed.

[0037] In the first case, the actual attenuation is bounded by thesingle remaining attenuation range. We can say it is the detectedattenuation can be the average of the high and low attenuations.Alternatively, if the history of each overlapping attenuation range ismaintained (or regenerated) a probabilistic approach of determining aweighted median value for determining the detected attenuation can beimplemented.

[0038] For the second case where the attenuation appears to remainsnon-unique, the set of candidate attenuation ranges can be used todetermine multiple sets of indistinguishable PCM code pairs can bedetermined for each candidate attenuation. The generated sets ofindistinguishable PCM code pairs can then be matched with the originalreceived set. The generated set using the correct attenuation shouldmatch nearly identically if not identically. The sets corresponding toincorrect potential attenuations would generate significant number ofadditional pairs of indistinguishable PCM code pairs or have missingindistinguishable PCM code pairs. Thus the correct detected attenuationcan still be determined using this procedure. (Multiple candidateattenuations appear to arise from attenuations of 6 dB or greatercombined with the decreasing step sizes used in with uLaw or Alawcompanding.)

[0039] Processing of Missing PCM Codes

[0040] The procedure described above for using indistinguishable PCMcodes to determine the attenuation can be adapted to operate withmissing received PCM codes. The transmitted PCM codes corresponding eachof the received PCM codes around the missing PCM code can be determined.Follow the same algorithm except that the minimum and maximumattenuations are exchanged in the algorithms. In other words, the largertransmitted PCM code produces the maximum attenuation and the smallertransmitted PCM code produces the minimum attenuation. With thisadaptation, the algorithm described remains essentially the same.

EXAMPLE

[0041] Transmitted Received shifted by 1 PCM code uLaw Linear uLawThreshold Attenuation dB 144 3999 144 3935 0.983996 −0.14013 143 41914063 0.969458 −0.26942

[0042] Other Variations

[0043] For robustness with real signals corrupted by noise, it may bedesirable to allow a certain number of pairs of indistinguishable PCMcodes not to match a candidate range. An alternative to simply droppinga candidate attenuation range would be to use a probabilistic greatestlikelihood model for selection of the detected attenuation.

[0044] Furthermore, given that implementers of digital attenuation padsmay understand and implement the mapping process slightly differently(i.e., use of G.71 1 threshold values or average between PCM codes) andallow various inaccuracies in the numerical operations (numericrepresentation, rounding, truncation, etc.), each candidate attenuationrange may need to be broadened to make overlap again more likely. Thebroadening can be by a fixed value or a relative amount about theattenuation computed. The previous suggestion of discarding a certainnumber of pairs of indistinguishable PCM codes also addresses thisproblem as very few pairs are likely to be affected by these numericalinaccuracies.

[0045] As for digital attenuation pads that pass through the robbed bitsignaling (RBS) information, the algorithms presented can also beapplied except that the indistinguishable transmit PCM code pairs willbe separated by one code and a second indistinguishable transmit PCMcode pair will adjacent. The candidate attenuation ranges become bigger,but still can be matched by the procedures presented in this invention.

[0046] The procedures described in this invention suggest a robustmanner to identify the digital channel attenuation though the use ofreceived PCM codes corresponding to a known transmit PCM code sequence.The use of such an algorithm would be necessary when the FCC permits thechannel power to be increased in compensation for the systematic digitalattenuations.

[0047] We further suggest that knowledge of the exact received PCM codeset may be preferred by both the analog and digital PCM modems.Accordingly, the analog modem may send knowledge of the received codesto the digital modem. Echo cancellation in the digital PCM modem maythen operate with incrementally better performance with the knowledge ofactual PCM codes presented to the Codec. The receiver's desired spectralshaping can be more precisely honored by having the transmitter use theknowledge of the actual PCM codes presented to the Codec in the shapingfunction implementation, then reversely mapping the PCM code aftershaping to the transmit PCM code to be sent.

[0048] The exclusive use of pre-identified attenuation table mappingswould make the PCM modem technology incapable of operating with existingprivate telephone equipment. It is recommended that the attenuation padmappings be discovered for each connection.

[0049]FIG. 1 shows a process in accordance with an embodiment of theinvention. Initially a digital modem transmits a known training sequenceof PCM codes to an analog modem (100). The training sequence is received(102) at the analog modem where it is quantized (104). Identical PCMcodes or omitted PCM codes of the training sequence are then identified(106). Using the identical or omitted PCM codes, the transformation ofthe digital channel is then determined (108). Subsequently, knowledge ofthe received codes is provided to the digital modem (110). When received(112), the digital modem may use the knowledge of the received codes forspectral shaping or echo cancellation (114).

[0050]FIG. 2 shows an echo cancellation process in accordance with theinvention in a digital modem that sends codes to an analog modem andreceives knowledge of received codes as illustrated in FIG. 1 (112).Initially, the digital modem saves the codes transmitted from saiddigital modem to said analog modem (200). The codes transmitted by thedigital modem are then transformed to the codes received by the analogmodem using a mapping table (202). The digital modem then uses thereceived codes as a reference signal for cancellation of echo (204).

[0051]FIG. 3 shows a spectral shaping process using a transmit shapingtransfer function in accordance with the invention in a digital modemthat sends codes to an analog modem and receives knowledge of receivedcodes as illustrated in FIG. 1 (112). Initially the codes transmitted bythe digital modem are transformed to the codes received by the analogmodem using a mapping table (300). The received codes are then used fortransformation to their linear value equivalent representations (302).The linear value representations are the applied to the transmit shapingtransfer function (304).

What we claim is:
 1. A method of determining digital channelattenuation, comprising: receiving a known training sequence of PCMcodes, which PCM codes are subjected to said attenuation within saiddigital channel; quantizing said received known training sequence of PCMcodes according to a predetermined thresholding procedure; identifyingidentical PCM codes created as a result of said thresholding procedure;and, determining said attenuation of the digital channel based upon saididentification of identical PCM codes.
 2. A method of determiningdigital channel attenuation, comprising: receiving a known trainingsequence of PCM codes, which PCM codes are subjected to said attenuationwithin said digital channel; quantizing said received known trainingsequence of PCM codes according to a predetermined thresholdingprocedure; identifying PCM codes omitted as a result of saidthresholding procedure; and, determining said attenuation of the digitalchannel based upon said identification of omitted PCM codes.
 3. A methodof determining a digital channel PCM code transformation comprising:receiving a known training sequence of PCM codes, which PCM codes aresubjected to said PCM code transformation within said digital channel;quantizing said received known training sequence of PCM codes accordingto a predetermined thresholding procedure; and determining thetransformation of transmitted codes to those received.
 4. A method ofimproved echo cancellation in a communications network having an analogand a digital modem, comprising: saving codes transmitted from saiddigital modem to said analog modem for echo cancellation; transforming,by a mapping table, codes transmitted from said digital modem to codesreceived by said analog modem; and using said received codes as areference signal for cancellation of echo.
 5. A method of improvedspectral shaping using a transmit shaping transfer function in acommunications network having an analog and a digital modem, comprising:transforming, by a mapping table, codes transmitted from said digitalmodem to codes received by said analog modem; using said received codesfor transformation to their linear value equivalent representations;and, applying said linear value representations to said transmit shapingtransfer function.